package hb.software.teacher.category;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.hb.software.base.domain.BaseTreeEntity;
import hb.software.teacher.entity.Teacher;

@Entity
@Table(name = "T_TeacherCategory")
@NamedQueries({@NamedQuery(name = "TeacherCategory.getRoot", query = "select g from TeacherCategory g where g.parent is null")})
public class TeacherCategory extends BaseTreeEntity<TeacherCategory, Long> {

    private static final long serialVersionUID = 6748702632187024733L;
    /**
     *
     */
    @Column
    String code;

    /**
     * name for product category
     */
    @Column
    String name;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Teacher> getTeachers() {
        return teachers;
    }

    public void setTeachers(List<Teacher> teachers) {
        this.teachers = teachers;
    }


    @OneToMany
    List<Teacher> teachers;

}
